#ifndef BIT_WIN_MODEL_TEMPLATES_H
#define BIT_WIN_MODEL_TEMPLATES_H


#include <iterator>
#include <algorithm>

namespace BitWin
{


// First declared in model_class.h
template <template <typename> class Maker, typename FwdIter>
void Model::commitData(FwdIter begin, FwdIter end)
{
    this->_data.clear();
    
    std::transform(
        begin, end,
        std::back_inserter(this->_data),
        Maker<typename std::iterator_traits<FwdIter>::value_type>()
    );
    
    this->reset();
}


} // BitWin namespace end


#endif
